package cn.njupt.cmpSort;

public class InsertionSort1<E extends Comparable<E>> extends Sort<E>{
    @Override
    public void sort() {

        for (int begin = 1; begin <array.length; begin++) {
            int cur=begin;
            while(cur>0 &&cmp(cur-1,cur)>0){
                swap(cur-1,cur);
                cur--;
            }

        }

    }
}
